<?php

namespace App\Kuafu\CustomerCoupon\Validate;

use Illuminate\Http\Request;
use App\Kuafu\Base\Validate\BaseValidate;

class CustomerCouponValidate extends BaseValidate
{
    public static function getCustomerCouponById($data)
    {
        $rules = [
            'id' => 'required|integer|min:0',
        ];
        $messages = [];

        return self::validateCheck($data, $rules, $messages);
    }

    public static function getCustomerCouponId($data): string
    {
        $rules = [
            'couponId' => 'required|integer|min:0',
        ];
        $messages = [];

        return self::validateCheck($data, $rules, $messages);
    }

    public static function getCustomerCouponList($data)
    {
        $rules    = [
            'pageSize' => self::commonRules('pageSize'),
            'pageNum'  => self::commonRules('pageNum'),
        ];
        $messages = [];

        return self::validateCheck($data, $rules, $messages);
    }

    public static function addCustomerCoupon($data)
    {
        $rules    = [];
        $messages = [];

        return self::validateCheck($data, $rules, $messages);
    }

    public static function setCustomerCoupon($data)
    {
        $rules = [
            'id' => 'required|integer|min:0',
        ];
        $messages = [];

        return self::validateCheck($data, $rules, $messages);
    }

    public static function delCustomerCoupon($data)
    {
        $rules = [
            'id' => 'required|integer|min:0',
        ];
        $messages = [];

        return self::validateCheck($data, $rules, $messages);
    }

    public static function patchCustomerCouponStatus($data)
    {
        $rules = [
            'id'     => 'required|integer|min:0',
            'status' => 'required|integer|between:0,1',
        ];
        $messages = [];

        return self::validateCheck($data, $rules, $messages);
    }
}
